Operating System - Interview Questions and Answers for 'Operating System' | Search Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Operating System - Interview Questions and Answers for 'Operating System' - 34 question(s) found - Order By Newest

next 30
Frequently asked to fresh graduates.
  Q1. What is a Deadlock ?Operating System
Ans. When two threads are waiting each other and cant precede the program is said to be deadlock.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   threads   multi threading   operating system   deadlock  concurrency     Asked in 23 Companies      basic        frequent


Frequently asked to fresh graduates.
 Q2. Explain Thread States ?Operating System
Ans. Runnable - waiting for its turn to be picked for execution by the thread schedular based on thread priorities.

Running - The processor is actively executing the thread code. It runs until it becomes blocked, or voluntarily gives up its turn.

Waiting: A thread is in a blocked state while it waits for some external processing such as file I/O to finish.

Sleeping - Java threads are forcibly put to sleep (suspended) with Thread.sleep. they can resume using Thread.resume method.

Blocked on I/O - Will move to runnable after I/O condition like reading bytes of data etc changes.

Blocked on synchronization - Will move to Runnable when a lock is acquired.

Dead - The thread is finished working.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   threads   multi threading   scheduling   thread states   basic interview question     Asked in 1 Companies      basic        frequent

Try 2 Question(s) Test


Usually asked only to fresh graduates.
 Q3. What is the difference between time slicing and preemptive scheduling ?Operating System
Ans. In preemptive scheduling, highest priority task continues execution till it enters a not running state or a higher priority task comes into existence. In time slicing, the task continues its execution for a predefined period of time and reenters the pool of ready tasks.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     operating system   scheduling   threads   multi threading        rare


Frequently asked to fresh graduates.
  Q4. Difference between Process and Thread ?Operating System
Ans. Process is a program in execution whereas thread is a separate path of execution in a program.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   threads   multi threading   operating system   process vs thread     Asked in 24 Companies      basic        frequent


 Q5. What is race condition ?Operating System
Ans. A source of possible errors in parallel programming, where one thread can cause an error in another thread by changing some aspect of the state of the program that the second thread is depending on (such as the value of variable).

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java.threads   multithreading   race condition   parallel programming   synchronization   ebay   concurrency     Asked in 10 Companies


 Q6. What is meant by an "asynchronous event." Give some examples ?Operating System
Ans. An asynchronous event is one that occurs at an unpredictable time outside the control of the program that the CPU is running. It is not "synchronized" with the program.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     j2ee   internet   web application   asynchronus   asynchronus communication   architecture     Asked in 1 Companies


 Q7. Difference between Virtual Memory and Demand Paging?Operating System
 This question was recently asked at 'Veritas'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     Virtual Memory vs Demand Paging     Asked in 1 Companies


Frequently asked to fresh graduates.
 Q8. What are the difference between Threads and Processes ?Operating System
Ans. 1. when an OS wants to start running program it creates new process means a process is a program that is currently executing and every process has at least one thread running within it.
2). A thread is a path of code execution in the program, which has its own local variables, program counter(pointer to current execution being executed) and lifetime.
3. When the JavaVirtual Machine (JavaVM, or just VM) is started by the operating system, a new process is created. Within that process, many threads can be created.
4. Consider an example : when you open Microsoft word in your OS and you check your task manger then you can see this running program as a process. now when you write something in opened word document, then it performs more than one work at same time like it checks for the correct spelling, it formats the word you enter , so within that process ( word) , due to different path execution(thread) all different works are done at same time.
5. Within a process , every thread has independent path of execution but there may be situation where two threads can interfere with each other then concurrency and deadlock come is picture.
6. like two process can communicate ( ex:u open an word document and file explorer and on word document you drag and drop another another file from file explorer), same way two threads can also communicate with each other and communication with two threads is relatively low.
7. Every thread in java is created and controlled by unique object of java.lang.Thread class.
8. prior to jdk 1.5, there were lack in support of asynchronous programming in java, so in that case it was considered that thread makes the runtime environment asynchronous and allow different task to perform concurrently.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   operating system   threads   processes     Asked in 2 Companies        frequent


Usually asked only to fresh graduates.
 Q9. Why threads block or enters to waiting state on I/O?Operating System
Ans. Threads enters to waiting state or block on I/O because other threads can execute while the I/O operations are performed.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   threads   multithreading   scheduling   operating system


Frequently asked to fresh graduates.
 Q10. What is the difference between yield() and sleep()?Operating System
Ans. When a object invokes yield() it returns to ready state. But when an object invokes sleep() method enters to not ready state.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   threads   multi threading   yield   sleep   scheduling   operating system     Asked in 4 Companies      basic        frequent


Usually asked only to fresh graduates.
 Q11. What is the initial state of a thread when it is created and started?
Ans. Ready state.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     operating system   threads   multi threading   java   thread states     Asked in 1 Companies      basic        frequent


 Q12. What is suspend() method used for ?
Ans. suspend() method is used to suspend the execution of a thread for a period of time. We can then restart the thread by using resume() method.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   threads   multi threading   operating system   synchronization      basic        rare


Usually asked only to fresh graduates.
 Q13. Difference between suspend() and stop() ?
Ans. Suspend method is used to suspend thread which can be restarted by using resume() method. stop() is used to stop the thread, it cannot be restarted again.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   threads   multi threading   operating system   synchronization   suspend   stop      basic        rare


Usually asked only to fresh graduates and less experienced developers.
  Q14. What is a daemon thread? Give an Example ?
Ans. These are threads that normally run at a low priority and provide a basic service to a program or programs when activity on a machine is reduced. garbage collector thread is daemon thread.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   threads   multi threading   operating system   daemon thread   garbage collection     Asked in 10 Companies      intermediate        frequent

Try 2 Question(s) Test


 Q15. Difference between PATH and CLASSPATH ?Operating System
Ans. PATH is the variable that holds the directories for the OS to look for executables. CLASSPATH is the variable that holds the directories for JVM to look for .class files ( Byte Code ).

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   path   classpath   byte code   jvm   basic interview question     Asked in 3 Companies      intermediate        rare


 Q16. Should we create system software ( e.g Operating system ) in Java ?Core Java
Ans. No, Java runs on a virtual machine called JVM and hence doesn't embed well with the underlying hardware. Though we can create a platform independent system software but that would be really slow and that's what we would never need.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   system software java   jvm   yes-no   yes no   java operating system   architecture


 Q17. What are the fail safe systems ?Operating System
Ans. Fail Safe systems are tolerant systems that continue processing even if they sense any problem. the objective here is to continue with the processing even if there are some problems instead of completely shutting it down. Example could be to catch an exception and still letting it complete with partial results.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     fail safe systems   system design   exception handling     Asked in 3 Companies


 Q18. why should one we use 32 bit system instead of 64 bit?Operating System
Ans. Performance of a system doesn't solely rely on size of processor or it's communication size. It should also be compatible with other resources like memory, storage etc. Moreover it makes no sense to have 64 bit systems when there is hardly any software than can run on 64 bit system.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


 Q19. What is ACL ?Operating System
Ans. Access Control List or ACL is the list of permissions attached to an object in the File System.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     acl  file system  file security  object security  operating system


 Q20. Difference between Mutex and Semaphore? Operating System
 This question was recently asked at 'Veritas'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     Mutex vs Semaphore     Asked in 1 Companies


 Q21. Explain process life cycle.Operating System
 This question was recently asked at 'Veritas'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q22. What is an Operating system or OS ?Operating System
 This question was recently asked at 'Veritas'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q23. What is thrashing?Operating System
 This question was recently asked at 'Veritas'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 1 Companies


 Q24. What is Priority inversion ?Operating System
Ans. Priority inversion is a problematic scenario in scheduling in which a high priority task is indirectly preempted by a lower priority task effectively inverting the relative priorities of the two tasks.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 5 Companies


 Q25. What are the four situations that are required for deadlock to happen ?Operating System
Ans. mutual exclusion i.e the resource is not shareable and hence a process should have exclusive access to it at a particular time

Hold and Wait i.e the process doesn't release all existing resources held by it before requesting for another one.

No preemption i.e noone can forcefully release a resource held by another process and the process should voluntarily release the resource held by it.

Circular Wait - For ex, P1 is waiting on resource to be released by P2, P2 is waiting on resource to be released by P3 and P3 is waiting on the resource to be released by P1

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     deadlock  process


 Q26. What is Livelock in relation to deadlock ?Operating System
Ans. Livelock is when two threads or processes get deadlocked because they try to perform the same action to come out of a potential deadlock.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     livelock  deadlock]


 Q27. What is the difference between CountingSemaphore and a CountDownLatch?Operating System
 This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     CountingSemaphore  CountDownLatch


 Q28. What is a host file ?Operating System
Ans. It's an operating system file that maps IP address to host names. The hosts file assists the OS in addressing networked components and serves the function of translating human friendly hostnames into numeric protocol addresses, called IP addresses, that identify and locate a host in an IP network.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     host file  operating system     Asked in 1 Companies


 Q29. Solve the producer and consumer problemOperating System
 This question was recently asked at 'Dell'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     producer consumer problem  multi-process synchronization problem     Asked in 1 Companies


 Q30. What is optimistic and pessimistic locking ?Operating System
 This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     


next 30

Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: